from dataclasses import dataclass

from playwright.sync_api import Page


@dataclass
class Context:
    page: Page
    navigate_urls: list[tuple[str, str]]  # 跳转url,原始url
    iframe_urls: list[tuple[str, str]]  # iframeurl,父url
    outside_request_urls: set[str]  # 网页引用的外部资源
    jsevents: list[tuple[str, str]]  # name,value
    htmls: list[tuple[str, str]]  # url,html内容
